/**
 * JungoPushModule
 * PushDaoImpl.java
 * 
 * Copyright 2013 Teachizen
 * Written by cloudstick
 *	2013. 8. 12. first written.
 *
 * note:
 */
package com.jungo.module.dao;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import com.jungo.module.bean.Deal;

/**
 * @author cloudstick
 *
 */
@Repository
public class PushDaoImpl extends SqlSessionDaoSupport implements PushDao {

	/* (non-Javadoc)
	 * @see com.jungo.module.dao.PushDao#getDeals()
	 */
	@Override
	public List<Deal> getDeals() {
		return getSqlSession().selectList("PushDao.getDeals");
	}

	/* (non-Javadoc)
	 * @see com.jungo.module.dao.PushDao#getRegistrationId(java.lang.String)
	 */
	@Override
	public String getRegistrationId(String userid) {
		return getSqlSession().selectOne("PushDao.getRegistrationId", userid);
	}

	/* (non-Javadoc)
	 * @see com.jungo.module.dao.PushDao#updateDealStatus(com.jungo.module.bean.Deal)
	 */
	@Override
	public void updateDealStatus(Deal deal) {
		// TODO Auto-generated method stub
		getSqlSession().update("PushDao.updateDealStatus", deal);
	}

}
